/*
 *  Array.cpp
 *  T3nsors
 *
 *  Created by Michael Barriault on 10-11-08.
 *  Copyright 2010 MikBarr Studios. All rights reserved.
 *
 */

#include <T3nsors/Array.h>
#include <cstdlib>
#include <cstdio>

T3::Array::Array(void) {
	return;
}

T3::Array::Array(int n, std::string iid) {
	_.assign(n, 0.);
	id = iid;
}

real& T3::Array::operator[](int i) {
	if (!(_[i] == _[i])) {
		printf("\nGot a NaN here, item %d of object %s\n", i, id.c_str());
		exit(-1);
	}
	return _[i];
}

